package online.longzipeng.cinemasys.vo.session;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author lzp
 * @date 2021/4/10 10:15
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "场次保存对象",description = "请求参数类")
public class SessionSaveVO {

    /**
     * 外键-播放电影的id
     */
    @ApiModelProperty(value = "外键-播放电影的id",example = "1",required = true)
    @Min(value = 0,message = "播放电影的id必须为大于0的数字！！")
    private Long movieId;

    /**
     * 外键-影厅的id
     */
    @ApiModelProperty(value = "外键-影厅的id",example = "1",required = true)
    @Min(value = 0,message = "播放电影的id必须为大于0的数字！！")
    private Long hallId;

    /**
     * 电影开始播放时间
     */
    @ApiModelProperty(value = "电影开始播放时间",example = "2021-4-10 17:29:55",required = true)
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime startTime;

    /**
     * 电影结束播放时间
     */
    @ApiModelProperty(value = "电影结束播放时间",example = "2021-4-10 17:29:55",required = true)
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime endTime;

    /**
     * 票价
     */
    @ApiModelProperty(value = "票价",example = "985",required = true)
    @Min(value = 0,message = "票价必须为大于0的数字！！")
    private BigDecimal price;
}
